/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * @Date: 2022-04-22 00:48:50
 * @LastEditors: Sam
 * @LastEditTime: 2022-05-06 01:03:39
 */

import request from '@/utils/request'

/**
 * 列表
 * @param params
 * @returns {AxiosPromise}
 */
export function list(params) {
  return request({
    url: '/admin/survey_question_index',
    method: 'get',
    params
  })
}


/**
 * 列表
 * @param params
 * @returns {AxiosPromise}
 */
 export function record(params) {
  return request({
    url: '/admin/survey_question_index',
    method: 'get',
    params
  })
}

/**
 * 详情
 * @param id
 * @returns {AxiosPromise}
 */
 export function detail(id) {
    return request({
      url: `/admin/survey_question_detail?id=`+id,
      method: 'get',
    })
  }

  /**
 * 删除
 * @param id
 * @returns {AxiosPromise}
 */
export function del(id) {
    return request({
      url: `/admin/survey_question_delete`,
      method: 'post',
      data:{
        ids:id
      }
    })
  }

  
  /**
 * 删除选项
 * @param id
 * @returns {AxiosPromise}
 */
export function del_option(id) {
  return request({
    url: `/admin/survey_del_option`,
    method: 'post',
    data:{
      id:id
    }
  })
}



  /**
 * 创建
 * @param data
 * @returns {AxiosPromise}
 */
export function create(data) {
    return request({
      url: '/admin/survey_question_create',
      method: 'post',
      data
    })
  }



        /**
 * 编辑
 * @param data
 * @returns {AxiosPromise}
 */
export function edit(data) {
  return request({
    url: '/admin/survey_question_edit',
    method: 'post',
    data
  })
}
